package com.hx.localmiaosha.service;

import com.hx.common.R;
import com.hx.common.domain.MiaoshaGoods;
import com.hx.common.domain.MiaoshaUser;
import com.hx.common.domain.OrderInfo;
import com.hx.common.to.OrderMessageTo;

/**
 * @Author wonghiu
 * @Date 2021/6/6 10:59
 * @Version 1.0.1
 */
public interface LocalOrderService {
    void createMiaoShaOrder(OrderMessageTo orderMessageTo);

    void createPreOrder(MiaoshaUser miaoshaUser, MiaoshaGoods miaoshaGoods,OrderMessageTo orderMessageTo);

    boolean createPreOrderNoCache(OrderMessageTo orderMessageTo);

    boolean createPreOrderWithCache(OrderMessageTo orderMessageTo);

    void updateMiaoshaOrderStateById(Long orderId, Integer stateId);
    void updateOrderStatusById(Long orderId,Integer stateId);

    OrderInfo getOrderById(Long orderId);

    R check(Long orderId);

    Integer getOrderStateById(Long orderId);

    boolean finishPreOrder(OrderMessageTo orderMessageTo);
}
